<?php
require('../action/db.php');
require('/usr/local/lib/php/Smarty/Smarty.class.php');
$cmd = "SHOW COLUMNS FROM MOVIE_QUEUE LIKE  'video_status'";
$rs  = $db->Execute($cmd);
$enum=$rs->getRows();
//var_dump(str_replace("'","",$enum[0]['Type']));
$enum_arr=explode("(",$enum[0]['Type']);
$enum=$enum_arr[1];
$enum_arr=explode(")",$enum);
$enum=str_replace("'","",$enum_arr[0]);
$enum_arr=explode(",",$enum);

$cmd 		= "SELECT * FROM SPIDER_PRODUCT";
$rs  		= $db->Execute($cmd);
$product	= $rs->getRows();
//var_dump($product);


 $smarty = new Smarty();

  $smarty->setTemplateDir('../smarty/templates');
  $smarty->setCompileDir('../smarty/templates_c');
  $smarty->setCacheDir('../smarty/cache');
  $smarty->setConfigDir('../smarty/configs');

  $smarty->assign('enum_arr', $enum_arr);
  $smarty->assign('product' , $product);

  $smarty->display('video_status_index.tpl');
?>
